<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>书籍查询</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
        }
        .search-container {
            margin-bottom: 20px;
        }
        #bookInput {
            padding: 10px;
            width: 300px;
            margin-right: 10px;
        }
        button {
            padding: 10px 20px;
            background-color: #4CAF50;
            color: white;
            border: none;
            cursor: pointer;
        }
        button:hover {
            background-color: #45a049;
        }
        .iframe-container {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
        }
        iframe {
            width: 100%;
            height: 500px;
            border: 1px solid #ddd;
            margin-bottom: 20px;
        }
    </style>
</head>
<body>
    <div class="search-container" style="text-align: center;">
        <input type="text" id="bookInput" placeholder="输入书籍名称">
        <button onclick="openAllSites()">提交</button>
    </div>
    
    <script>

        // 网站列表模板数组

        // 打开所有网站的函数
        function openAllSites() {
            const bookName = document.getElementById('bookInput').value.trim();
            if (!bookName) {
                alert('请输入书籍名称');
                return;
            }

            // 网站列表数组
            const websites = [
                `http://iq.iqhulian.com/?tag=2&dirMatch=0&s=${encodeURIComponent(bookName)}&orderType=0&ts=2&fileType=3`,
                `https://www.pdfdz.com/plugin.php?id=keke_doc&keyword=${encodeURIComponent(bookName)}&ac=list`,
                `http://xtvps.wicp.net:888/searchppc.php?title=${encodeURIComponent(bookName)}`,
                `https://annas-archive.org/search?q=${encodeURIComponent(bookName)}`,
                `https://libgen.gs/index.php?req=${encodeURIComponent(bookName)}&columns[]=t&columns[]=a&columns[]=s&columns[]=y&columns[]=p&columns[]=i&objects[]=f&objects[]=e&objects[]=s&objects[]=a&objects[]=p&objects[]=w&topics[]=l&topics[]=c&topics[]=f&topics[]=a&topics[]=m&topics[]=r&topics[]=s&res=100&covers=on&showch=on&gmode=on&filesuns=all`,
                `https://www.free-ebooks.net/search/${encodeURIComponent(bookName)}`,
                `https://www.gutenberg.org/ebooks/search/?query=${encodeURIComponent(bookName)}&submit_search=Go!`,
                `https://www.pdfbooksworld.com/index.php?route=product/search&search=${encodeURIComponent(bookName)}`,
                `https://www.owlook.com.cn/search?wd=${encodeURIComponent(bookName)}`,
                `https://libgen.ac/s/${encodeURIComponent(bookName)}`,
                `https://www.freebookcentre.net/TestResults.php?q=${encodeURIComponent(bookName)}`,
                `https://24hbook.com/api/search?title=${encodeURIComponent(bookName)}&offset=0&limit=10`,
                `https://market.feedbooks.com/search?query=${encodeURIComponent(bookName)}`
            ];
            
            websites.forEach(url => {
                window.open(url, '_blank', 'noopener noreferrer');
            });
        }

        // 创建一个按钮来触发打开操作
        document.addEventListener('DOMContentLoaded', () => {
            const button = document.createElement('button');
            button.textContent = '搜索所有资源';
            button.className = 'bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded';
            button.onclick = openAllSites;

            document.body.appendChild(button);
        });

    </script>
</body>
</html>
